<template>
	<div class="page-box">
		<el-row>
			<el-col>
				<el-button type="primary" icon="el-icon-edit" size="mini" @click="defineProcess">流程定义</el-button>
			</el-col>
		</el-row>
	</div>
</template>

<script>
	import { processDefinitionList } from "@/api/activiti/user/definition"
	export default {
		name: 'user-activity-define',
		data() {
			return {
				list: [],
				queryParams: {
					pageNum: 1,
					pageSize: 10,
				},
				total: 0,
			}
		},
		mounted() {
			this.getList();
		},
		methods: {
			getList() {
				processDefinitionList(this.queryParams).then(res => {
					this.total = res.total;
					this.list = res.rows;
				})
			},
			// 进入流程定义
			defineProcess() {
				localStorage.setItem("ActivityCommonType", 0);
				this.$router.push({
					path: "/activiti_common_define?type=0"
				})
			},
		}
	}
</script>

<style scoped>
</style>
